package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/*
 * @Author:itchenqi175@163.com
 * @Time:2024/2/23  13:46
 * @Description:自定义的为了填充档案的footer的底部九宫格自定义的
 */
public class ArchivesManageFileMy implements Parcelable {

    //这一类档案附件的类型标志
    private int fileType;

    //档案附件的名称内容
    private String fileTypeName;

    //档案附件的在详情修改，上传需要的半截路径 ，不是全路径
//    private String filePath;

    //单纯的装载九宫格的图片路径信息，这里装载的是全路径
    private ArrayList<ArchivesManageImage> images = new ArrayList<>();


    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }


    public ArrayList<ArchivesManageImage> getImages() {
        return images;
    }

    public void setImages(ArrayList<ArchivesManageImage> images) {
        this.images = images;
    }

    public String getFileTypeName() {
        return fileTypeName;
    }

    public void setFileTypeName(String fileTypeName) {
        this.fileTypeName = fileTypeName;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.fileType);
        dest.writeString(this.fileTypeName);
//        dest.writeString(this.filePath);
        dest.writeList(this.images);
    }

    public void readFromParcel(Parcel source) {
        this.fileType = source.readInt();
        this.fileTypeName = source.readString();
//        this.filePath = source.readString();
        this.images = new ArrayList<ArchivesManageImage>();
        source.readList(this.images, ArchivesManageImage.class.getClassLoader());
    }

    public ArchivesManageFileMy() {
    }

    protected ArchivesManageFileMy(Parcel in) {
        this.fileType = in.readInt();
        this.fileTypeName = in.readString();
//        this.filePath = in.readString();
        this.images = new ArrayList<ArchivesManageImage>();
        in.readList(this.images, ArchivesManageImage.class.getClassLoader());
    }

    public static final Parcelable.Creator<ArchivesManageFileMy> CREATOR = new Parcelable.Creator<ArchivesManageFileMy>() {
        @Override
        public ArchivesManageFileMy createFromParcel(Parcel source) {
            return new ArchivesManageFileMy(source);
        }

        @Override
        public ArchivesManageFileMy[] newArray(int size) {
            return new ArchivesManageFileMy[size];
        }
    };
}
